'use strict';

module.exports = app => {
  const mongoose = app.mongoose;
  const UserSchema = new mongoose.Schema({
    uid: {
      type: String,
      required: true,
    },
    name: {
      type: String,
      required: true,
    },
    nick: String,
    password: {
      type: String,
      required: true,
    },
    tel: String,
    email: String,
    QQ: String,
    weixin: String,
    avatar: String,
    money: String,
    vip: false,
    startTime: Date,
    endTime: Date,
  });

  return mongoose.model('User', UserSchema);
};

